home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zoom 2
/
Zoom - Release 2 (1996)(Active Software)[!].iso
/
texts
/
dosman121
/
man
/
prompt
< prev
next >
Wrap
Text File
|
1995-05-19
|
4KB
|
119 lines
Prompt(V1.3 in C:) (2.x/3.x internal)
NAME
Prompt - changes the prompt for the CLI or Shell.
SYNOPSIS
Prompt "Prompt"
DESCRIPTION
Prompt sets a new prompt for the current CLI. Prompt
with no argument resets the CLI prompt to the default,
which is just "> ". Shells differ in their
interpretation of special characters for the prompt. For
example, the Shell will accept the following characters
in its prompt string:
%S - expands to pathname of current directory
%N - expands to current task number.
%R -2.x/3.x Only: expands to the Return Code
for the last program that was executed
from that SHELL.
The CLI default prompt is n>, with 'n' being the task
number associated with the current task number of that
shell. For instance, the if no other applications are
running, and the shell is open, the prompt will be 1>. If
there are two other tasks running, the prompt will be 3>.
If used with a SHELL instead of the CLI, PROMPT can
display the current directory as part of the command
prompt. If you look at your s/Shell-startup script file,
you will see how the PROMPT command changes the default
string to the task number of the SHELL, followed by a
period, then the current directory path, a
right-angle-bracket, then a space.
KEYWORDS
"Prompt"
The string that replaces the active CLI's prompt. If
"Prompt" is left blank, then the prompt will be changed
to >. You can designate up to 59 characters for your
string. If there are any spaces, then you must enclose
the entire string in quotation marks. You may also use
ANSI escape sequences to change the prompt color, or
italics.
Here is a complete list of the ANSI escape
characters:
ESC-[1m Switches to BOLD characters.
ESC-[2m Switches character color to color 3.
ESC-[3m Switches Italics on.
ESC-[4m Switches Underline on.
ESC-[7m Switches Reverse video on.
ESC-[8m Switches background color off.
ESC-[0m Switches to normal characters.
ESC-c Switches to normal characters and clears
the screen.
** When using these ESC key combinations, don't type
'ESC', instead, press the 'Esc' key on your keyboard. You
will then see a reverse video bracket as your printed
character. After that reverse video character you can
type in the rest of the Escape sequence.
** You may also use the keys "*e" (an asterix
followed by the letter 'e'). This will have the same
effect as using the ESC key. Actually, it is better
because some editors (such as CEd, Ed, and others) uses
the ESC key to enter the command mode.
EXAMPLES
1) To change the current prompt to 'Amiga!:'
PROMPT Amiga!
2) To change the current prompt to 'Mehedi Who?:'
PROMPT "Mehedi Who?"
3) To change the current prompt to 'Amiga Task n
Waiting' (where n is the current task number):
PROMPT "Amiga Task %N Waiting "
4) To change the current prompt to show the task
number and current directory in reverse text, seperated
by angle brackets:
PROMPT "<esc>[7m%N>>%S><esc>[0m "
5) To show the date and time with each prompt
(2.x/3.x only):
PROMPT "'DATE*' > "
This uses the apostrophe (back tick) character to
output the result of the DATE command to the prompt
string. The asterisk character is used as an escape to
indicate that the DATE command is to be executed each
time the prompt string is printed. If this escape
character is not used, the prompt string will always
print the same time and date. (see backtick for more
information on this command).
See Also: Asterix